#Day day up 3
dayup = 1.0
dayfactor = 0.01
for i in range(365):
    if i%7 in [6,0]:
        dayup = dayup*(1-dayfactor)
    else:
        dayup = dayup*(1+dayfactor)
print("The day up {:.2f}".format(dayup))
#Day day up 4
def dayUp(df):
    dayup = 1
    for i in range(365):
        if i%7 in [6,0]:
           dayup = dayup*(1-0.01)
        else:
           dayup = dayup*(1+df)
    return(dayup)
dayfactor = 0.01
while dayUp(dayfactor) < pow(1.01,365):
    dayfactor += 0.001
print("You should do {:0.3f}".format(dayfactor))